<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<title>学生管理系统</title>
<link href="css/bootstrap.min.css" rel="stylesheet">
<link href="css/sb-admin.css" rel="stylesheet">
<link href="css/students.css" rel="stylesheet">
<link href="font-awesome/css/font-awesome.min.css" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="./layer/theme/default/layerui.css">
<link href="js/dplayer/dplayer.min.css" rel="stylesheet">
<link href="js/webuploader/webuploader.css" rel="stylesheet">
<!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
    <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
<![endif]-->

<script src="js/jquery.js"></script>
<script src="js/templateie/es5-shim.min.js"></script>
<script src="js/templateie/es5-sham.min.js"></script>
<script src="js/templateie/json3.min.js"></script>
<script src="js/template-web.js"></script>
<script src="js/webuploader/webuploader.js"></script>
</head>
<body>
<div id="wrapper">
    <div id="page-wrapper">
        <div class="container-fluid">
                <div class="row"  id="common">
                <script type="text/html" id="commonTpl">
                    <div class="col-lg-12">
                        <div class="panel panel-default">
                            <div class="panel-heading">
                                <h3 class="panel-title"><i class="fa fa-money fa-fw"></i> 商品列表</h3>
                            </div>
                            <button type="button" class="btn btn-lg btn-success add_list add_cur" data_id = "{{res.id}}">添加</button>
                            <div class="panel-body">
                                <div class="table-responsive">
                                    <table class="table table-bordered table-hover table-striped">
                                        <thead>
                                            <tr>
                                                <th width='5%'>商品编号</th>
                                                <th width='10%'>商品名称</th>
                                                <th width='10%'>分类名称</th>
                                                <th width='10%'>类别</th>
                                                <th width='10%'>类型</th>
                                                <th width='10%'>原价</th>
                                                <th width='10%'>现价</th>
                                                <th width='5%'>状态</th>
                                                <th width='5%'>费用类型</th>
                                                <th width='10%'>创建时间</th>
                                                <th width='15%'>操作</th>
                                            </tr>
                                        </thead>
                                        <tbody>
                                            {{each res.data as item index}}
                                            <tr data_id="{{item.id}}">
                                                <td width='5%'>{{item.goods_sn}}</td>
                                                <td width='10%'>{{item.name}}</td>
                                                <td width='10%'>{{item.category_name}}</td>
                                                <td width='10%'>{{item.assort}}</td>
                                                <td width='10%'>{{item.type}}</td>
                                                <td width='10%'>{{item.original_price}}</td>
                                                <td width='10%'>{{item.current_price}}</td>
                                                <td width='5%'>{{item.status}}</td>
                                                <td width='5%'>{{item.shop_type}}</td>
                                                <td width='10%'>{{item.created_at}}</td>
                                                <td width='15%'>
                                                    <button type="button" class="btn btn-xs btn-danger frame_list" data_id="{{item.id}}" data_type = "{{(item.status == '上架') ? '2' : '1'}}">
                                                        {{(item.status == '上架') ? '下架' : '上架'}}
                                                    </button>
                                                    <!-- <button type="button" class="btn btn-xs btn-success info_list" data_id="{{item.id}}">查看</button> -->
                                                    <button type="button" class="btn btn-xs btn-success mod_list" data_id="{{item.id}}">修改</button>
                                                    {{if item.assort == '答题'}}
                                                    <button type="button" class="btn btn-xs btn-success create_list" data_id="{{item.id}}" data_type="{{item.type}}" data_assort="{{item.assort}}" data_category="{{item.category_id}}">创建题目</button>
                                                    {{else}}
                                                    <button type="button" class="btn btn-xs btn-success create_list" data_id="{{item.id}}" data_type="{{item.type}}" data_assort="{{item.assort}}" data_category="{{item.category_id}}">创建视频</button>
                                                    {{/if}}
                                                </td>
                                            </tr>
                                            {{/each}}
                                        </tbody>
                                    </table>
                                </div>
                            </div>
                        </div>
                    </div>
                </script>

                



                
            </div>
        </div>
    </div>
</div>
<!--  二三级模板 -->
<script type="text/html" id="commoncreateTpl">
    <div class="col-lg-12">
        <div class="panel panel-default">
            <div class="panel-heading">
                <h3 class="panel-title"><i class="fa fa-money fa-fw"></i> 列表</h3>
            </div>
            <button type="button" class="btn btn-lg btn-success cancal_list" data_id = "{{res.parent_id}}">返回上一类别</button>
            <div class="panel-body">
                <div class="table-responsive">
                    <table class="table table-bordered table-hover table-striped">
                        <thead>
                            <tr>
                                <th width='30%'>商品编号</th>
                                <th width='30%'>商品名称</th>
                                <th width='40%'>操作</th>
                            </tr>
                        </thead>
                        <tbody>
                            {{if res.data.length == 0}}
                            <tr><td colspan="4" style="text-align:center;height:100px;line-height:100px;">暂无数据</td></tr>
                            {{else}}
                                {{each res.data as item index}}
                                <tr data_id="{{item.id}}">
                                    <td width='30%'>{{item.name}}</td>
                                    <td width='30%'>{{item.created_at}}</td>
                                    <td width='40%'>
                                        <button type="button" class="btn btn-xs btn-success info_second" data_id="{{item.id}}" data_level="{{item.level}}" data_pid="{{item.pid}}">查看</button>
                                    </td>
                                </tr>
                                {{/each}}
                            {{/if}}
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
</script>

<!--  题目-四级模板 -->
<script type="text/html" id="firstTpl">
    <div class="col-lg-12">
        <div class="panel panel-default">
            <div class="panel-heading">
                <h3 class="panel-title"><i class="fa fa-money fa-fw"></i> 列表</h3>
            </div>
            <button type="button" class="btn btn-lg btn-success cancal_list" data_id = "{{res.params}}">返回上一类别</button>
            <button type="button" class="btn btn-lg btn-success add_txt" data_id = "{{res.params[0]}}">添加</button>
            <div class="panel-body">
                <div class="table-responsive">
                    <table class="table table-bordered table-hover table-striped">
                        <thead>
                            <tr>
                                <th width='20%'>分类</th>
                                <th width='20%'>解析</th>
                                <th width='20%'>状态</th>
                                <th width='10%'>选项</th>
                                <th width='10%'>创建时间</th>
                                <th width='20%'>操作</th>
                            </tr>
                        </thead>
                        <tbody>
                            {{if res.data.length == 0}}
                            <tr><td colspan="6" style="text-align:center;height:100px;line-height:100px;">暂无数据</td></tr>
                            {{else}}
                            {{each res.data as item index}}
                            <tr data_id="{{item.id}}">
                                <td width='20%'>{{item.category_name}}</td>
                                <td width='20%'>{{@item.subject}}</td>
                                <td width='20%'>{{item.status}}</td>
                                {{if item.type == 1}}
                                <td width='10%'>单选</td>
                                {{else if item.type == 2}}
                                <td width='10%'>多选</td>
                                {{else if item.type == 3}}
                                <td width='10%'>判断</td>
                                {{/if}}
                                <td width='10%'>{{item.created_at}}</td>
                                <td width='20%'>
                                    <!-- <button type="button" class="btn btn-xs btn-success info_last" data_id="{{item.id}}">查看</button> -->
                                    <button type="button" class="btn btn-xs btn-success mod_txt" data_id="{{item.id}}">修改</button>
                                    <button type="button" class="btn btn-xs btn-danger del_four" data_id="{{item.id}}">删除</button>
                                </td>
                            </tr>
                            {{/each}}
                            {{/if}}
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
</script>

<!--  视频-四级模板 -->
<script type="text/html" id="videoTpl">
    <div class="col-lg-12">
        <div class="panel panel-default">
            <div class="panel-heading">
                <h3 class="panel-title"><i class="fa fa-money fa-fw"></i> 列表</h3>
            </div>
            <button type="button" class="btn btn-lg btn-success cancal_list" data_id = "{{res.params}}">返回上一类别</button>
            <button type="button" class="btn btn-lg btn-success add_video" data_id = "{{}}">添加</button>
            <div class="panel-body">
                <div class="table-responsive">
                    <table class="table table-bordered table-hover table-striped">
                        <thead>
                            <tr>
                                <th width='10%'>视频类型</th>
                                <th width='20%'>视频名称</th>
                                <th width='20%'>视频描述</th>
                                <th width='10%'>创建时间</th>
                                <th width='10%'>操作</th>
                            </tr>
                        </thead>
                        <tbody>
                            {{if res.data.length == 0}}
                            <tr><td colspan="6" style="text-align:center;height:100px;line-height:100px;">暂无数据</td></tr>
                            {{else}}
                            {{each res.data as item index}}
                            <tr data_id="{{item.id}}">
                                <td width='10%'>{{item.category_name}}</td>
                                <td width='20%'>{{item.name}}</td>
                                <td width='20%'>{{item.description}}</td>
                                <td width='10%'>{{item.created_at}}</td>
                                <td width='10%'>
                                    <!-- <button type="button" class="btn btn-xs btn-success info_last" data_id="{{item.id}}">查看</button> -->
                                    <button type="button" class="btn btn-xs btn-success mod_video" data_id="{{item.id}}">修改</button>
                                    <button type="button" class="btn btn-xs btn-danger del_video" data_id="{{item.id}}">删除</button>
                                </td>
                            </tr>
                            {{/each}}
                            {{/if}}
                        </tbody>
                    </table>
                </div>
            </div>
        </div>
    </div>
</script>




<div class="row" id="common" style="display: none;">
    <script type="text/html" id="commonTpl222">
        {{each res as item index}}
        <div class="col-lg-2 col-md-6 ">
        <dl class="box_shadow_trans ">
            <dt class="img_item">
                <p>
                    <img class="lazy" title="" alt="" src="{{item.img_url}}">
                </p>
                <div class="price_logo">
                <span>{{item.current_price}}万</span>
                </div>
            </dt>
            <dd class="title">{{item.name}}</dd>
            <dd class="price"><del>原价：{{item.original_price}}万 </del></dd>
            <dd class="desc">{{item.description}}</dd>
            </dl>
        </div>
        {{/each}}
    </script>
</div>












<script src="js/bootstrap.min.js"></script>
<script src="js/header.js"></script>
<script src="js/dplayer/dplayer.min.js"></script>
<script src="js/webuploader/hls.min.js"></script>
<script src="./layer/layer.js"></script>
<script src="js/commit.js"></script>
<script src="js/commonlist.js"></script>
</body>

</html>
